package com.duoec.dw.lineage.service.analyser;

import com.alibaba.druid.sql.ast.SQLObjectImpl;
import com.duoec.dw.lineage.dto.TableLineageDto;
import com.duoec.dw.lineage.dto.MultiTableLineageDto;

/**
 * @author xuwenzhen
 */
public interface HiveGroupByAnalyser<T extends SQLObjectImpl> {
    /**
     * 获取当前类处理的类型
     *
     * @return SQLSelectGroupByClause类型
     */
    Class<T> getType();

    /**
     * 解析 group by
     *
     * @param groupBy           order by语句
     * @param fromTableLineages from解析出来的多个血缘关系数据
     * @param tableLineage      当前语句的血缘关系数据
     */
    void analyse(T groupBy, MultiTableLineageDto fromTableLineages, TableLineageDto tableLineage);
}
